﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CreativeModel.FactoryMethod
{
    public class FactoryMethodClient
    {
        public void Main() {
            Console.WriteLine("App:启动ConcreteCreator_1");
            ClientCode(new ConcreteCreator_1());

            Console.WriteLine("");

            Console.WriteLine("App:启动ConcreteCreator_2");
            ClientCode(new ConcreteCreator_2());
            Console.WriteLine("");
        }

        public void ClientCode(Creator creator) {
            Console.WriteLine($"Client:我不知道创造者的类型，但它仍然在工作...\n{creator.SomeOperation()}");
        }
    }
}
